package com.example.demo2;


import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo2Application {

	public static void main(String[] args) {
		ApplicationContext act= new ClassPathXmlApplicationContext("Bean.xml");
        //实例化Login
        Login login=act.getBean("Login",Login.class);
        //方法调用
        login.login();
	}

}
